extends CanvasLayer

@onready var color: ColorRect = $ColorRect
@onready var timer: Timer = $Timer
@onready var battleOver: Panel = $BattleOver

var player: Player
signal playerHit

func _ready() -> void:
	playerHit.connect(hit)
	timer.timeout.connect(timeout)

func hit() -> void:
	color.color.a = 0.3
	timer.start()

func timeout() -> void:
	color.color.a = 0
